package 编程题;

import java.util.*;
public class Num_8_1_02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {// 注意，如果输入是多个测试用例，请通过while循环处理多个测试用例
            String str = sc.nextLine();
            int[] fb = new int[100001];
            fb[1] = 1;
            fb[2] = 2;

            for(int i = 3; i < 100001; i++){
                fb[i] = fb[i - 1] + fb[i - 2];
                fb[i] %= 1000000;
            }
            int index = 0;
            int tmp = 0;
            while( index < str.length() ){

                if(str.charAt(index) != '<'){

                    while( index < str.length() && str.charAt(index) != '<'){
                        tmp *= 10;
                        tmp += (str.charAt(index) - '0');
                        index ++;
                    }
                    System.out.print(fb[tmp]);
                    if(index != str.length() ){
                        System.out.print("<br/>");
                    }
                    index += 5;
                    tmp = 0;
                }

            }
            System.out.println();

        }
    }
}